using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Script.Serialization;

namespace Finance.Web.Models
{
    public class BankViewModel
    {
        public BankViewModel() { }

        public BankViewModel(Bank bank)
        {
            this.Code = bank.Code;
            this.Name = bank.Name;
            this.Info = bank.Info;
        }

        public int Code { get; set; }
        public string Name { get; set; }
        public string Info { get; set; }
    }

    public partial class Bank
    {
        public Bank()
        {
            this.Deposits = new List<Deposit>();
        }

        public int Code { get; set; }
        [Required]
        public string Name { get; set; }
        public string Info { get; set; }

        public virtual ICollection<Deposit> Deposits { get; set; }

    }
}
